package com.openbravo.pos.printer.escpos;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;

public class PrinterWritterFile extends PrinterWritter
{
  private String m_sFilePrinter;
  private OutputStream m_out;

  public PrinterWritterFile(String paramString)
  {
    this.m_sFilePrinter = paramString;
    this.m_out = null;
  }

  protected void internalWrite(byte[] paramArrayOfByte)
  {
    try
    {
      if (this.m_out == null)
        this.m_out = new FileOutputStream(this.m_sFilePrinter);
      this.m_out.write(paramArrayOfByte);
    }
    catch (IOException localIOException)
    {
      System.err.println(localIOException);
    }
  }

  protected void internalFlush()
  {
    try
    {
      if (this.m_out != null)
      {
        this.m_out.flush();
        this.m_out.close();
        this.m_out = null;
      }
    }
    catch (IOException localIOException)
    {
      System.err.println(localIOException);
    }
  }

  protected void internalClose()
  {
    try
    {
      if (this.m_out != null)
      {
        this.m_out.flush();
        this.m_out.close();
        this.m_out = null;
      }
    }
    catch (IOException localIOException)
    {
      System.err.println(localIOException);
    }
  }
}

/* Location:           D:\PowerFulPOS-2.30.2\openbravopos.jar
 * Qualified Name:     com.openbravo.pos.printer.escpos.PrinterWritterFile
 * JD-Core Version:    0.6.0
 */